package com.service;
import java.io.IOException;
import java.util.HashMap;
import javax.servlet.annotation.WebServlet;
import javax.servlet.*;
import javax.servlet.http.*;
import com.pojo.job;
import com.dao.*;
@WebServlet("/JobDisplayServlet")
	public class JobDisplayServlet extends HttpServlet {
	private static final long serialVersionUID = 1L;
	@Override
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		jobDb jd = new jobDb();
		HashMap<String, job> jobs = jd.selectJob();
		jd.close();
		HttpSession session = request.getSession();
		session.setAttribute("jobs",jobs);
		request.getRequestDispatcher("test.jsp").forward(request, response);
	 }
 	@Override
	protected void doPost(HttpServletRequest request, HttpServletResponse
response) throws ServletException, IOException {
	 doGet(request, response);
 	}
}